package com.kgc.sbt.api;

import com.kgc.sbt.domain.OrderInfo;
import com.kgc.sbt.domain.TempOrderInfo;

import java.util.Map;

/**
 * Created on 2021/6/23.
 * <p>
 * Author: yx
 * <p>
 * Description:微信支付业务接口
 */
public interface WxPayApi {

    /**
     * @return :
     * @author :
     * @date :
     * @description : 封装统一下单参数，返回拼接好的请求字符串
     */
    String getWxpayOrderParamsXmlStr(String body, String fromIp, int totalFee, String trade_no) throws Exception;

    /**
     * @return :
     * @author :
     * @date :
     * @description : 发送微信官方统一下单接口，获取下单返回结果
     */
    Map<String, String> send2WxpayUnifiedOrder(String wxpayOrderXmlStr) throws Exception;


    /**
     * @return :
     * @author : zhukang
     * @date : 2021-06-16
     * @description : 解析微信回调结果
     */
    String resolveWxpayOrderNotify(String wxpayOrderNotifyXmlStr) throws Exception;


    /**
     * 支付成功修改订单状态
     */
    boolean orderPaySuccess(Integer id);


    /**
     * 通过订单id查询金额-订单表
     */
    TempOrderInfo queryPayInfoByOrderId(String orderId);

    //    OrderInfo queryPayMoneyAndNumberByOrderId(Integer id); - 会员表
    TempOrderInfo queryVipPayInfoByOrderId(String orderId);

}
